#include <iostream>
#include <unistd.h>
#include <stdlib.h>
int main()
{
    const char *filename = "./calFileSize";

    const char *mylink = "linkCal";
#if 0
    int ret = symlink(filename, link);
    if (ret == -1)
    {
        perror("symlink error:\n");
        exit(-1);
    }
    printf("create soft link succrss!\n");
#endif

#if 1
    /*硬链接*/
    int ret = link(filename, mylink);
    if (ret == -1)
    {
        perror("link error:");
        exit(-1);
    }
    printf("create link success!\n");

#endif
    return 0;
}